package com.ruoyi.house.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.house.mapper.CrawlingAnjukeRecordMapper;
import com.ruoyi.house.domain.CrawlingAnjukeRecord;
import com.ruoyi.house.service.ICrawlingAnjukeRecordService;

/**
 * 爬取安居客租房信息记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-06-20
 */
@Service
public class CrawlingAnjukeRecordServiceImpl  extends ServiceImpl<CrawlingAnjukeRecordMapper,CrawlingAnjukeRecord> implements ICrawlingAnjukeRecordService
{
    @Autowired
    private CrawlingAnjukeRecordMapper crawlingAnjukeRecordMapper;

    /**
     * 查询爬取安居客租房信息记录
     * 
     * @param id 爬取安居客租房信息记录主键
     * @return 爬取安居客租房信息记录
     */
    @Override
    public CrawlingAnjukeRecord selectCrawlingAnjukeRecordById(Long id)
    {
        return crawlingAnjukeRecordMapper.selectCrawlingAnjukeRecordById(id);
    }

    /**
     * 查询爬取安居客租房信息记录列表
     * 
     * @param crawlingAnjukeRecord 爬取安居客租房信息记录
     * @return 爬取安居客租房信息记录
     */
    @Override
    public List<CrawlingAnjukeRecord> selectCrawlingAnjukeRecordList(CrawlingAnjukeRecord crawlingAnjukeRecord)
    {
        return crawlingAnjukeRecordMapper.selectCrawlingAnjukeRecordList(crawlingAnjukeRecord);
    }

    /**
     * 新增爬取安居客租房信息记录
     * 
     * @param crawlingAnjukeRecord 爬取安居客租房信息记录
     * @return 结果
     */
    @Override
    public int insertCrawlingAnjukeRecord(CrawlingAnjukeRecord crawlingAnjukeRecord)
    {
        crawlingAnjukeRecord.setCreateTime(DateUtils.getNowDate());
        return crawlingAnjukeRecordMapper.insertCrawlingAnjukeRecord(crawlingAnjukeRecord);
    }

    /**
     * 修改爬取安居客租房信息记录
     * 
     * @param crawlingAnjukeRecord 爬取安居客租房信息记录
     * @return 结果
     */
    @Override
    public int updateCrawlingAnjukeRecord(CrawlingAnjukeRecord crawlingAnjukeRecord)
    {
        crawlingAnjukeRecord.setUpdateTime(DateUtils.getNowDate());
        return crawlingAnjukeRecordMapper.updateCrawlingAnjukeRecord(crawlingAnjukeRecord);
    }

    /**
     * 批量删除爬取安居客租房信息记录
     * 
     * @param ids 需要删除的爬取安居客租房信息记录主键
     * @return 结果
     */
    @Override
    public int deleteCrawlingAnjukeRecordByIds(Long[] ids)
    {
        return crawlingAnjukeRecordMapper.deleteCrawlingAnjukeRecordByIds(ids);
    }

    /**
     * 删除爬取安居客租房信息记录信息
     * 
     * @param id 爬取安居客租房信息记录主键
     * @return 结果
     */
    @Override
    public int deleteCrawlingAnjukeRecordById(Long id)
    {
        return crawlingAnjukeRecordMapper.deleteCrawlingAnjukeRecordById(id);
    }
}
